<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let string1 = "hello world";
        console.log(string1.includes('world', 2)); //是否包含该字符串
        console.log(string1.startsWith("World")); //是否已字符串开头
        console.log(string1.endsWith('world')); //是否已字符串结尾
        console.log(string1.repeat(3));
        console.log("h".padStart(5));
        console.log("h".padStart(5, '0'));
        console.log('w'.padEnd(12, 'he'));
        console.log('w'.padEnd(12));
    </script>
</body>

</html>